#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using System.Windows.Forms;
#endregion

namespace Raytrace
{

    public class RaytraceForm : System.Windows.Forms.Form
    {
        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem fichierToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem sauvegarderSousToolStripMenuItem;
        private System.Windows.Forms.PictureBox pictureBox1;
    
        public RaytraceForm()
            : base()
        {
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.fichierToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.sauvegarderSousToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.menuStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // pictureBox1
            // 
            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.pictureBox1.Location = new System.Drawing.Point(0, 24);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(471, 390);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.pictureBox1.TabIndex = 0;
            this.pictureBox1.TabStop = false;
            // 
            // menuStrip1
            // 
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fichierToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(471, 24);
            this.menuStrip1.TabIndex = 1;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // fichierToolStripMenuItem
            // 
            this.fichierToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.sauvegarderSousToolStripMenuItem});
            this.fichierToolStripMenuItem.Name = "fichierToolStripMenuItem";
            this.fichierToolStripMenuItem.Size = new System.Drawing.Size(50, 20);
            this.fichierToolStripMenuItem.Text = "Fichier";
            // 
            // sauvegarderSousToolStripMenuItem
            // 
            this.sauvegarderSousToolStripMenuItem.Name = "sauvegarderSousToolStripMenuItem";
            this.sauvegarderSousToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
            this.sauvegarderSousToolStripMenuItem.Text = "Sauvegarder sous ...";
            this.sauvegarderSousToolStripMenuItem.Click += new System.EventHandler(this.sauvegarderSousToolStripMenuItem_Click);
            // 
            // RaytraceForm
            // 
            this.ClientSize = new System.Drawing.Size(471, 414);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.menuStrip1);
            this.MainMenuStrip = this.menuStrip1;
            this.Name = "RaytraceForm";
            this.Text = "Rendu";
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        public System.Windows.Forms.PictureBox PictureBox
        {
            get { return this.pictureBox1; }
        }

        private void sauvegarderSousToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog fd = new SaveFileDialog();
            fd.ShowDialog();
            if (fd.FileName != string.Empty)
            {

                this.pictureBox1.Image.Save(fd.FileName);
            }
        }


    }
}


